<div class="album wp-20" ui-view="container">
    <div ng-if="!noPermission">
        <div class="head_title">
            <span class="tit-color">专辑审核</span>
        </div>
        <div class="searchWapper white-background">
            <div class="form-group searchLump search-condition">
                <div class="searchTitle">搜索：</div>
                <div class="search-select">
                    <select ng-model="search.key"
                            ng-options="fileName.key  as fileName.value for fileName in fileNames" style="float: left"></select>
                    <input type="text" class="input width-150"  ng-model="search.value"    ui-event="{ keyup : 'keyup($event,search.value)' }">
                    <input type="button" class="btn btn-primary" style="margin-top: -3px" value="搜索" ng-click="findData()">

                </div>
            </div>

            <div class="form-group searchLump">
                <div class="searchTitle">筛选：</div>
                <div class="search-select">
                    <select ng-model="search.categoryId"
                            ng-options="category.categoryId  as category.categoryName for category in categories"
                            ng-change="categoryChange(search.categoryId)"></select>
                    <select ng-model="search.channelId"
                            ng-options="channel.channelId  as channel.channelName for channel in channels"
                            ng-change="channelChange()"></select>
                    <select ng-model="search.reviewStatus"
                            ng-options="status.key  as status.value for status in checkStatus"
                            ng-change="reviewStatusChange()"></select>
                    <select ng-model="search.adminId" ng-options="admin.adminId  as admin.fullName for admin in adminList"
                            ng-change="adminChange()"></select>

                </div>

            </div>
            <div class="form-group searchLump">
                <div class="searchTitle">操作：</div>
                <div class="search-select">
                    <button class="btn btn-primary" style="margin-left: 20px" ng-click="adjustChannel()">调整频道</button>
                </div>

            </div>
        </div>

        <div class="white-background" style="margin:15px  0px">

            <table class="table table-bordered table-hover table-page">

                <thead>
                <tr>
                    <th><input type="checkbox" id="allCheck" class="magic-checkbox" ng-model="$parent.allChecked"
                               ng-change="allCheckChange(allChecked)">
                        <label for="allCheck"></label></th>
                    <th>专辑_ID</th>
                    <th>专辑名称</th>
                    <th>账户名</th>
                    <th>一级频道</th>
                    <th>二级频道</th>
                    <th>节目数</th>
                    <th>总时长</th>
                    <th>审核状态</th>
                    <th>审核人{{pageNo}}</th>
                    <!--<th>播控状态</th>-->
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>
                <tr ng-if="pageNo==1">
                    <td>总计</td>
                    <td>1</td>
                    <td>2</td>
                    <td>3</td>
                    <td>4</td>
                    <td>5</td>
                    <td>6</td>
                    <td>7</td>
                    <td>8</td>
                    <td>9</td>
                    <td>10</td>
                </tr>
                <tr ng-repeat="album in albums">

                    <td>
                        <input type="checkbox" id="{{$index}}" class="magic-checkbox" ng-model="album.checked"
                               ng-change="albumCheckChange(album)">
                        <label for="{{$index}}"></label>
                    </td>
                    <td>
                        {{album.albumId}}
                    </td>
                    <td>
                        {{album.albumName}}
                    </td>
                    <td>
                        {{album.cpName}}
                    </td>
                    <td>
                        {{album.categoryName}}
                    </td>
                    <td>
                        {{album.channelName}}
                    </td>
                    <td>
                        {{album.programNums}}
                    </td>
                    <td>
                        {{album.duration}}
                    </td>
                    <td ng-class="{'red':album.reviewStatus==9,'green':album.reviewStatus==8,'yellow':album.reviewStatus==7}">
                        {{table[album.reviewStatus]}}
                    </td>
                    <td>
                        {{album.adminName}}
                    </td>

    <!--                <td class="{{album.reviewStatus|statusColor}}">
                        {{table[album.reviewStatus]}}
                    </td>-->
                    <td>
                        <a ui-sref="main.album.manage({albumId:album.albumId,pageSize:null,pageNo:null})" class="time-out">编审</a>
                        <a ui-sref="main.album.program({albumId:album.albumId})"  ui-sref-opts="{inherit:false}" class="time-out">节目管理</a>
                    </td>
                </tr>
                </tbody>
            </table>
        </div>

        <div class="panel-footer paging">
            <s-pagination conf="paginationConf"></s-pagination>
        </div>


        <script type="text/ng-template" id="adjustChannel.html">

        <div class="modal-header bg-white">
            <button type="button" class="close" ng-click="modelCancel()"><span>&times;</span></button>
            <span class="modal-title">调整频道</span>
        </div>
        <div class="modal-body ng-cloak">
            <div class="form-group">
                <label class="col-sm-3 control-label" style="padding: 5px">一级频道：</label>
                <div class="col-sm-7 ">
                    <select style="width: 150px;" ng-model="search.categoryId"
                            ng-options="category.categoryId  as category.categoryName for category in categories"
                            ng-change="categoryChange(search.categoryId)"></select>

                </div>
            </div>
            <div class="clear"></div>

            <div class="form-group">
                <label class="col-sm-3 control-label" style="padding: 5px">二级频道：</label>
                <div class="col-sm-7 personal-head">
                    <select style="width: 150px" ng-model="search.channelId"
                            ng-options="channel.channelId  as channel.channelName for channel in channels"
                            ng-change="channelChange()"></select>

                </div>
            </div>

            <div class="clear"></div>

        </div>
        <div class="modal-footer">
            <button class="btn btn-primary" type="button" ng-click="modelOk()">确定</button>
            <button class="btn ims-btn" type="button" ng-click="modelCancel()">取消</button>
        </div>

    </script>
    </div>

    <div ng-if="noPermission" ng-include="'templates/no-permission.html'"></div>

    <!--<a ui-sref="campaigns.detail({campaignsId:1})"  ui-sref-opts="{inherit:false}">aaaaa</a>-->
</div>
